<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('文件上传')" />
</head>
<body class="white-bg">
	<div class="row wrapper wrapper-content animated fadeInRight pt5">
		<div class="btn-group-sm" id="toolbar" role="group">
			<a class="btn btn-primary" onclick="Easyfile.add()">
                <i class="fa fa-plus"></i> 添加
            </a>
			<a class="btn btn-primary multiple disabled" onclick="Easyfile.start()">
	            <i class="fa fa-play"></i> 开始
	        </a>
	        <a class="btn btn-primary multiple disabled" onclick="Easyfile.pause()">
	            <i class="fa fa-pause"></i> 暂停
	        </a>
	        <a class="btn btn-primary multiple disabled" onclick="Easyfile.remove()">
	            <i class="fa fa-trash"></i> 删除
	        </a>
        </div>
		<div class="col-sm-12 select-table table-striped">
		    <table id="bootstrap-table" data-mobile-responsive="true"></table>
		</div>
		<form class="form-horizontal m" id="form-easyfile-upload">
			<input type="file" multiple="multiple" class="hide"/>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<th:block th:include="include :: easyfile-js" />
	
	<!-- 表格操作列 -->
	<script id="operateTpl" type="text/template">
	<tmpl>
		{{if (status != "success" && status != "starting")}}
		<a href="javascript:Easyfile.start('${id}');" class="mr10" data-toggle="tooltip" data-placement="top" title="开始">
			<i class="fa fa-play"></i>
		</a>
		{{else (status == "starting")}}
		<a href="javascript:Easyfile.pause('${id}');" class="mr10" data-toggle="tooltip" data-placement="top" title="暂停">
			<i class="fa fa-pause"></i>
		</a>
		{{/if}}
		{{if (status != "starting")}}
		<a href="javascript:Easyfile.remove('${id}');" class="mr10" data-toggle="tooltip" data-placement="top" title="删除">
			<i class="fa fa-trash"></i> 
		</a> 
		{{/if}}
	</tmpl>
	</script>
	<script th:inline="javascript">
		$(function () {
			Easyfile.init({
				url : ctx + "easyfile/upload", 
				allowConfig : [[${allowConfig}]]
			});
		});
	</script>
</body>
</html>
